package org.javaboy.vhr.service;
import	java.util.Date;

import com.github.pagehelper.Page;
import org.javaboy.vhr.mapper.EmployeeecMapper;
import org.javaboy.vhr.model.Employeeec;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: demo
 * @description:
 * @author: yang
 * @create: 2020-06-30 14:14
 **/
@Service
public class EmployeeecService {
    @Autowired
    private EmployeeecMapper employeeecMapper;

    public Page<Employeeec> getAll() {

        return employeeecMapper.getAll();
    }

    public boolean add(Employeeec employeeec) {
        employeeec.setEcdate(new Date());
        int count = employeeecMapper.insert(employeeec);

        if (count > 0) {
            return true;
        }
        return false;
    }

    public boolean delete(Integer id) {
        int count = employeeecMapper.deleteByPrimaryKey(id);
        if (count > 0) {
            return true;
        }
        return false;
    }
}
